import {
    center,
    right,
    grid,
    input,
    button,
    search,
    header,
} from '@/css/DialogsCss.module.scss';
export default {
    title:'客户列表',
    dialog:{
        size:'50%'
    },
    onMounted: [{
        action: 'set',
        target: '$widgets.formbasic',
        field: 'value',
        value: '$params'
    }],
    items: [{
        region: 'center',
        span: 10,
        class: center,
        layout: 'vertical',
        items: [{
            layout: 'vertical',
            items: [{
                id: 'formbasic',
                widget: 'form',
                layout: {
                    type:'gridform',
                    column:2
                },
                fields:[{
                    itemId:'name',
                    widget:'form-text',
                    label:'客户名称',
                },{
                    itemId:'industry',
                    widget:'form-text',
                    label:'所属行业',
                },{
                    itemId:'state_id',
                    widget:'form-text',
                    label:'客户状态',
                },{
                    itemId:'contacts',
                    widget:'form-text',
                    label:'联系人',
                },{
                    itemId:'salesman',
                    widget:'form-text',
                    label:'跟进人',
                },{
                    itemId:'phone',
                    widget:'form-text',
                    label:'手机号码',
                },{
                    itemId:'qq',
                    widget:'form-text',
                    label:'QQ号码',
                },{
                    itemId:'wechat',
                    widget:'form-text',
                    label:'微信号码',
                },{
                    itemId:'remarks',
                    widget:'form-text',
                    label:'备注说明',
                },{
                    itemId:'current_stage_id',
                    widget:'form-text',
                    label:'当前阶段',
                },{
                    itemId:'last_follow_time',
                    widget:'form-text',
                    label:'最近联系',
                },{
                    itemId:'contents',
                    widget:'form-text',
                    label:'沟通内容',
                },{
                    itemId:'next_plan_time',
                    widget:'form-text',
                    label:'下次跟进',
                },{
                    itemId:'source_id',
                    widget:'form-text',
                    label:'客户来源',
                },{
                    itemId:'label_id',
                    widget:'form-text',
                    label:'客户标签',
                },{
                    itemId:'grade_id',
                    widget:'form-text',
                    label:'客户等级',
                }],
                // buttons: [{
                //     value: '保存',
                //     onClick: [{
                //         action: 'confirm',
                //         title: '表单保存',
                //         message: '是否保存表单?',
                //         confirm: [{
                //             action: 'service',
                //             path: 'customer/customer_list/save',
                //             params: '$widget.value'
                //         }, {
                //             action: 'message',
                //             message: '保存成功',
                //             type: 'success'
                //         }, {
                //             action: 'service',
                //             path: 'customer/customer_list/list',
                //             params:{
                //                 page_size:'$widgets.grid.pageSize',
                //                 page_no:'$widgets.grid.page',
                //                 keywords: '$widgets.search.value.keywords',
                //                 is_show: '$widgets.search.value.is_show',
                //             },
                //             actions: [{
                //                 action:'set',
                //                 target:'$widgets.grid',
                //                 field:'value',
                //                 value:'$params.data.items'
                //             },{
                //                 action:'set',
                //                 target:'$widgets.grid',
                //                 field:'total',
                //                 value:'$params.data.total'
                //             }]
                //         },{
                //             action:'dialog-hide',
                //             mode:'apply'
                //         }]
                //     }]
                // }],
                flex: true
            }]
        }]
    }]
};


